package ex3.render.raytrace;

import java.util.Map;
import math.Point3D;
import math.Vec;

public abstract class Light implements IInitable
{
	protected Vec color;

    public Light()
    {
        color = new Vec(1.0D, 1.0D, 1.0D);
    }

    public void init(@SuppressWarnings("rawtypes") Map attributes)
    {
        if(attributes.containsKey("color"))
            color = new Vec((String)attributes.get("color"));
    }

    public abstract Vec getColor(Point3D point3d);

    public abstract Vec getDirection(Point3D point3d);

    public abstract double getShadow(Point3D point3d, double d);

}